<?php
$return_url = '';
if(isset($_SERVER['HTTP_REFERER'])){
	$return_url = '?' . urlencode('return_url=' . $_SERVER['HTTP_REFERER']);
}
if($user_info['isGuest']){
	echo '<a href="/Site/Login' . $return_url . '">登录</a> | <a href="/Site/Regist' . $return_url . '">注册</a>';
}else{
	echo '<a href="/User">' . $user_info['name'] . '</a>';
	if(in_array('Administrator', $user_info['roles'])){
		echo ' | <a href="/manage">后台管理</a>';
	}
	echo ' | <a href="/Site/Logout">退出</a>';
}